package com.larry

import java.io.{File, PrintWriter}
import java.net.ServerSocket

object Scala_Slaver {
  def main(args: Array[String]): Unit = {
    val server = new ServerSocket(9999)
    println("--------------")
    //阻塞
    val client = server.accept()
    println("等待。。。。。。。。。")
    val in = client.getInputStream
    val res = in.read()
    println(res)

    in.close()
    client.close()
    server.close()

  }

}
